'''
python直接定义了一些函数，供我们使用，这些函数叫内置函数
print()
max()
min()
list()
str()
set()
ord()
chr()
eval() 计算表达式的值 evaluate
zip() 打包 将可迭代的对象打包成元组,返回一个zip对象
enumerate() 遍历字符串，元组，列表
'''
a="3+4"
print(eval("3+4"))
print(eval("3+4+8"))

print(eval("3>4"))
b = eval("[4,5,6,1]")
print(type(b))

c="{'tom':56,'lucy':78}"
print(type(eval(c)))

a1 = [2,3,4]
b1 = ["a","b","c"]
c1 = zip(a1,b1)  # <zip object at 0x000002ECA7A3AA80>
print(c1)
# print(list(c1))
# print(dict(c1))
print(tuple(c1))

x = [2,3,4,5]
y = ["a","b","c"]
z = ["*","&","^"]
p = zip(x,y,z)
print(list(p))
# print(dict(p))  # 报错

str1= "hello world"
for i in str1:  # i 代表字符
    print(i)

for j in range(len(str1)):  # j是下标
    print(str1[j])

for x,y in enumerate(str1,1): # x序号  y代表字符
    print(y,x,end=",")
